<template>
  <div id="goods-params">
    <div class="goods-size" v-if="goodsParams">
      <table v-for="(data, index) in goodsParams.size" :key="index">
        <tr v-for="(goods, j) in data" :key="j">
          <td v-for="(item, i) in goods" :key="i">
            <span>{{ item }}</span>
          </td>
        </tr>
      </table>
    </div>
    <div class="goods-info">
      <ul>
        <li v-for="(item, k) in goodsParams.info" :key="k">
          <span>{{ item.key }}</span>
          <span>{{ item.value }}</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    goodsParams: Object
  },
  data() {
    return {}
  },
  methods: {}
}
</script>

<style lang="less" scoped>
#goods-params {
  border-top: 8px solid #f2f5f8;
  margin-top: 10px;
  padding: 10px;
  .goods-size {
    padding: 20px 0;
    table {
      width: 100%;
      border-collapse: collapse;
    }
    tr {
      border-bottom: 1px solid #eee;
    }
    td {
      padding: 3px 0;
    }
    span {
      font-size: 14px;
    }
  }
  .goods-info {
    ul {
      li {
        display: flex;
        align-items: center;
        border-bottom: 1px solid #ccc;
        line-height: 30px;
        span {
          font-size: 14px;
        }
        :first-child {
          min-width: 80px;
        }
        :last-child {
          color: var(--color-a);
        }
      }
    }
  }
}
</style>
